<?php

class Home extends Controller {

    function Home()
    {
        parent::Controller();
        //$this->output->enable_profiler(TRUE);
    }

    function index()
    {
        /*
         * INSTRUCTIONS ON HOW TO LOAD A TEMPLATE:
         * THE TEMPLATE LIBRARY HAS A 'BUILD' FUNCTION THAT CAN LOAD VIEWS FROM
         * A TEMPLATE LOCATED IN SYSTEM/APPLICATION/VIEWS/TEMPLATES WHICH SHOULD
         * HAVE TWO FILES: HEADER.PHP AND FOOTER.PHP
         * 
         * THE 'BUILD' FUNCTION HAS 5 PARAMETERS
         * build($view, $data, $template, $header, $footer)
         *
         * $view IS THE LOCATION OF THE VIEW FILE STARTING FROM THE
         * /system/application/view FOLDER
         */

        if ($this->auth->logged_in())
        {
            redirect("setup_creative");
        }
        else
        {
            $this->template->build('home/home');
        }
        
    }

}

/* End of file welcome.php */
/* Location: ./system/application/controllers/welcome.php */